﻿using PersistenceLayer.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PersistenceLayer.DAL
{
	public class UsuarioDAL
	{
		private Entities Entity;

		public UsuarioDAL()
		{
			Entity = new Entities();
		}

		public Usuario Obter(int ID)
		{
			return Entity.Usuario.Where(a => a.ID == ID).SingleOrDefault();
		}

		public Usuario ObterPorLoginSenha(string login, string senha)
		{
			return Entity.Usuario.Where(a => a.Login == login && a.Senha == senha).SingleOrDefault();
		}
	}
}
